Debugging profiler for Kubernetes setup

List the helm deployments

Command: helm list

Example output:

Copy
NAME                                          NAMESPACE    REVISION   UPDATED                                        STATUS        CHART                              APP VERSION
<snowflake-profiler-helm-installation-name>    default        1        2025-02-05 11:40:54.596712927 +0000 UTC        deployed      snowflake-profiler-helm-1.0.0      1.0.0

Checking the status of the helm deployment

Command: helm status <snowflake-profiler-helm-installation-name>

Example output:

Copy
NAME: snowflake-profiler
LAST DEPLOYED: Wed Feb  5 11:40:54 2025
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None

Checking the pod status

Command: kubectl get pods --namespace=<profiler-namespace>

Example output:

Copy
NAME                             READY   STATUS       RESTARTS    AGE
<snowflake-profiler-pod-name>     1/1     Running       0          9m38s

Capturing the pod events

Command: kubectl events --namespace <profiler-namespace>

Example output:

Copy
LAST SEEN           TYPE      REASON                  OBJECT                                             MESSAGE
18s                 Normal    WaitForFirstConsumer    PersistentVolumeClaim/profiler-yaml-pvc            waiting for first consumer to be created before binding
18s                 Normal    WaitForFirstConsumer    PersistentVolumeClaim/profiler-database-pvc        waiting for first consumer to be created before binding
18s                 Normal    ScalingReplicaSet       Deployment/snowflake-profiler-service              Scaled up replica set snowflake-profiler-service-857bfbbd65 to 1
18s                 Normal    SuccessfulCreate        ReplicaSet/snowflake-profiler-service-857bfbbd65   Created pod: snowflake-profiler-service-857bfbbd65-lhp9p
...

Capturing the pod logs

Command: kubectl logs -f <snowflake-profiler-pod-name> --namespace <profiler-namespace>

Example output:

Copy
...
INFO: @ 2025-02-05 12:16:26,093 [MainProcess : 10 : main : : 60] : ****** Starting the profiler **********
INFO: @ 2025-02-05 12:16:26,094 [MainProcess : 10 : main : : 61] : Sample INFO Log... 
WARNING: @ 2025-02-05 12:16:26,094 [MainProcess : 10 : main : : 62] : Sample WARNING Log... 
ERROR: @ 2025-02-05 12:16:26,094 [MainProcess : 10 : main : : 63] : Sample ERROR Log... 
DEBUG: @ 2025-02-05 12:16:26,095 [MainProcess : 10 : main : : 64] : Sample DEBUG Log...
...